Function Reference

_AD_Close

Closes the connection established to Active Directory by _AD_Open.

#Include <AD.au3>
_AD_Close()

 

Parameters

None.

 

Return Value

Success: 1
Failure: 0, sets @error to:
    1 - Closing the connection to the AD failed. @extended returns the error code received by the COM error handler

 

Remarks

Even if closing the connection wasn't successfull and @error is set all used variables have been reset.

 

Related

_AD_Open

 

Example


#AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=Y
; *****************************************************************************
; Example 1
; Open a connection to the Active Directory; get the Fully Qualified Domain
; Name (FQDN) for the current user; close the connection.
; *****************************************************************************
#include <AD.au3>

; Open Connection to the Active Directory
_AD_Open()
If @error Then Exit MsgBox(16, "Active Directory Example Skript", "Function _AD_Open encountered a problem. @error = " & @error & ", @extended = " & @extended)

; Get the Fully Qualified Domain Name (FQDN) for the current User
Global $sFQDN = _AD_SamAccountNameToFQDN()
MsgBox(64, "Active Directory Functions - Example 1", "The Fully Qualified Domain Name (FQDN) for the currently logged on user is: " & @CRLF & $sFQDN)

; Close Connection to the Active Directory
_AD_Close()